package com.app.common.exception;

import lombok.Data;

/**
 * @author : [zhuhj]
 * @version : [v1.0]
 * @className : AppException
 * @description : [描述说明该类的功能]
 * @createTime : [2025/8/13 21:51]
 * @updateUser : [zhuhj]
 * @updateTime : [2025/8/13 21:51]
 * @updateRemark : [描述说明本次修改内容]
 */
@Data
public class AppException extends RuntimeException {
    private static final long serialVersionUID = 1L;

    private String msg;
    private int code = 500;

    public AppException(String msg) {
        super(msg);
        this.msg = msg;
    }

    public AppException(String msg, Throwable e) {
        super(msg, e);
        this.msg = msg;
    }

    public AppException(String msg, int code) {
        super(msg);
        this.msg = msg;
        this.code = code;
    }

    public AppException(String msg, int code, Throwable e) {
        super(msg, e);
        this.msg = msg;
        this.code = code;
    }
}